package com.zjp.service.impl;

import com.zjp.mapper.IVaccinesMapper;
import com.zjp.mapper.I_SiteAndAreaMapper;
import com.zjp.pojo.IVaccines;
import com.zjp.service.ISiteAndVaccService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ISiteAndVaccServiceImpl implements ISiteAndVaccService {
    @Autowired
    private I_SiteAndAreaMapper iSiteAndVaccMapper;
    @Autowired
    private IVaccinesMapper iVaccinesMapper;
    /**
     *查询接种点疫苗表所有数据
     * @return
     */
    public List<IVaccines> findAllIVacc() {
        return iVaccinesMapper.selectByExample(null);
    }

    /**
     * 接种点疫苗库存加一
     * @param id
     * @return
     */
    public int addOne(Long id) {
        return iVaccinesMapper.addOne(id);
    }

    /**
     * 接种疫苗减一
     *
     * @param ivId
     * @return
     */
    public int deleteOne(Long ivId) {
        return iVaccinesMapper.deleteOne(ivId);

    }
}
